#ifndef HCTHREAD_H
#define HCTHREAD_H

#include "progressthread.h"
#include "hash.h"
#include <qtextstream.h>

class MainWindow;
class HashDialog;

class HashLine {
	QString _hash;
	QString _alg;
public:
	HashLine(QString& hash, QString& alg): 
		_hash(hash),
		_alg(alg) {}
	QString hash() { return _hash; }
	QString alg() { return _alg; }

};

class CheckResult{
private:
	QString _filename;
	bool _status;
public:
	CheckResult(QString filename, bool status);
	void setFilename(QString file);
	void setStatus(bool stat);
	QString filename() const;
	bool status() const;
};

class HCThread: public ProgressThread {
	QMap<QString, HashLine *> _hashes;
public:
	HCThread(MainWindow* parent, QStringList& files, QMap<QString, HashLine *>& hashes);
	QList<CheckResult> _out;
	~HCThread();
protected:
	bool job(QString &fileName);
};



#endif // HCTHREAD_H
